package com.ylkj.bus.onoffline.monitor.rule.constant;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: wengzx
 * @Date: 2025/4/23
 * @Desc:
 */
public class RuleReportConstant {
    /**
     * 告警上报type
     */
    public static final String REPORT_EVENT_SYS_ALARM_TYPE = "EVENT_SYS_ALARM";

    /**
     * 告警上报type
     */
    public static final String REPORT_EVENT_CON_ALARM_TYPE = "EVENT_CON_ALARM";

    /**
     * 上报数据
     */
    public static final String DATA = "data";
    /**
     * 客户端id
     */
    public static final String CLIENTID = "clientid";

    /**
     * 上报主题名称
     */
    public static final String TOPIC = "topic";

    /**
     * 设备数据上报后缀
     */
    public static final String MQTT_DEVICE_DATA_TOPIC_SUFFIX = "/device/data";
    public static final String MQTT_CONTAINER_DATA_TOPIC_SUFFIX = "/container/data";
    public static final String MQTT_APP_DATA_TOPIC_SUFFIX = "/app/data";

    /**
     * 上报数据类型
     */
    public static final String TYPE = "type";

    /*****************告警恢复常量私有**********************/
    /**
     * cpu利用率超过阈值恢复
     */
    private static final String CPU_RECOVERY = "1002";
    /**
     * 内存使用率超过阈值恢复
     */
    private static final String MEMORY_RECOVERY = "1004";
    /**
     * 上盖关盖
     */
    private static final String COVER_CLOSE_RECOVERY = "3013";
    /**
     * 端盖关盖
     */
    private static final String END_CAP_CLOSING_RECOVERY = "3014";
    /**
     * 掉电恢复
     */
    private static final String POWER_DOWN_RECOVERY = "3012";

    /**
     * 在线
     */
    private static final String DEVICE_ONLINE_STATUS = "online";




    /**
     * 恢复集合
     */
    public static final List<String> RECOVERY_LIST;

    /*********************对外开放恢复集合************************/
    static {
        RECOVERY_LIST = new ArrayList<>();
        RECOVERY_LIST.add(CPU_RECOVERY);
        RECOVERY_LIST.add(MEMORY_RECOVERY);
        RECOVERY_LIST.add(COVER_CLOSE_RECOVERY);
        RECOVERY_LIST.add(END_CAP_CLOSING_RECOVERY);
        RECOVERY_LIST.add(POWER_DOWN_RECOVERY);
        RECOVERY_LIST.add(DEVICE_ONLINE_STATUS);
    }

    /********************产品code集合**********************/
    /**
     * 福建台区智慧终端
     */
    private static final String FJ_WISDOM_TERMINAL = "JO9Wjbuu7355";
    /**
     * 台区智能融合终端
     */
    private static final String WISDOM_FUSION_TERMINAL = "R17BKfc0F120";
    /**
     * 新型智慧能源单元
     */
    private static final String NEW_WISDOM_ENERGY_UNIT = "weupQqasG271";
    /**
     * 中电装备智慧能源单元
     */
    private static final String EQUIPMENT_WISDOM_ENERGY_UNIT = "GmgJfKYH8411";

    /**
     * 产品code集合
     */
    public static final List<String> PRODUCT_CODE_LIST;

    /*********************对外开放恢复集合************************/
    static {
        PRODUCT_CODE_LIST = new ArrayList<>();
        PRODUCT_CODE_LIST.add(FJ_WISDOM_TERMINAL);
        PRODUCT_CODE_LIST.add(WISDOM_FUSION_TERMINAL);
        PRODUCT_CODE_LIST.add(NEW_WISDOM_ENERGY_UNIT);
        PRODUCT_CODE_LIST.add(EQUIPMENT_WISDOM_ENERGY_UNIT);
    }
}
